<script>
	var wSocket = new WebSocket("ws://localhost:8080");
	
	wSocket.onmessage = function(e){ alert(e.data);}
	
	wSocket.onopen = function(e){ alert ("server connect");}
	wSocket.opclose = function(e) { alert ("server disconnect");}
	
	function send(asdf){
		wSocket.send(asdf)
	}
</script>

<html>
<head></head>
<body>
<input type="button" onclick="send('push button')" value = "TEST" >
</body>
</html>